package com.ncsc.erp.model;
// Generated 20 มิ.ย. 2557, 12:55:43 by Hibernate Tools 3.4.0.CR1


import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * MmItemGroup generated by hbm2java
 */
@Entity
@Table(name="mm_item_group"
    ,catalog="ncsc_erp"
)
public class MmItemGroup  implements java.io.Serializable {


     private long itemGroupNo;
     private MmItemGroupLevel mmItemGroupLevel;
     private String itemGroupCode;
     private String itemGroupDescr;
     private Date itemGroupEffectiveDate;
     private Date itemGroupExpireDate;
     private Short itemGroupIsActive;
     private Set<MmItem> mmItems = new HashSet<MmItem>(0);
     private Set<MmItemGroupSub> mmItemGroupSubsForItemGroupNo = new HashSet<MmItemGroupSub>(0);
     private Set<MmItemGroupSub> mmItemGroupSubsForSubItemGroupNo = new HashSet<MmItemGroupSub>(0);

    public MmItemGroup() {
    }

	
    public MmItemGroup(long itemGroupNo) {
        this.itemGroupNo = itemGroupNo;
    }
    public MmItemGroup(long itemGroupNo, MmItemGroupLevel mmItemGroupLevel, String itemGroupCode, String itemGroupDescr, Date itemGroupEffectiveDate, Date itemGroupExpireDate, Short itemGroupIsActive, Set<MmItem> mmItems, Set<MmItemGroupSub> mmItemGroupSubsForItemGroupNo, Set<MmItemGroupSub> mmItemGroupSubsForSubItemGroupNo) {
       this.itemGroupNo = itemGroupNo;
       this.mmItemGroupLevel = mmItemGroupLevel;
       this.itemGroupCode = itemGroupCode;
       this.itemGroupDescr = itemGroupDescr;
       this.itemGroupEffectiveDate = itemGroupEffectiveDate;
       this.itemGroupExpireDate = itemGroupExpireDate;
       this.itemGroupIsActive = itemGroupIsActive;
       this.mmItems = mmItems;
       this.mmItemGroupSubsForItemGroupNo = mmItemGroupSubsForItemGroupNo;
       this.mmItemGroupSubsForSubItemGroupNo = mmItemGroupSubsForSubItemGroupNo;
    }
   
     @Id 

    
    @Column(name="ITEM_GROUP_NO", unique=true, nullable=false)
    public long getItemGroupNo() {
        return this.itemGroupNo;
    }
    
    public void setItemGroupNo(long itemGroupNo) {
        this.itemGroupNo = itemGroupNo;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="ITEM_GROUP_LEVEL_NO")
    public MmItemGroupLevel getMmItemGroupLevel() {
        return this.mmItemGroupLevel;
    }
    
    public void setMmItemGroupLevel(MmItemGroupLevel mmItemGroupLevel) {
        this.mmItemGroupLevel = mmItemGroupLevel;
    }

    
    @Column(name="ITEM_GROUP_CODE", length=50)
    public String getItemGroupCode() {
        return this.itemGroupCode;
    }
    
    public void setItemGroupCode(String itemGroupCode) {
        this.itemGroupCode = itemGroupCode;
    }

    
    @Column(name="ITEM_GROUP_DESCR", length=300)
    public String getItemGroupDescr() {
        return this.itemGroupDescr;
    }
    
    public void setItemGroupDescr(String itemGroupDescr) {
        this.itemGroupDescr = itemGroupDescr;
    }

    @Temporal(TemporalType.DATE)
    @Column(name="ITEM_GROUP_EFFECTIVE_DATE", length=10)
    public Date getItemGroupEffectiveDate() {
        return this.itemGroupEffectiveDate;
    }
    
    public void setItemGroupEffectiveDate(Date itemGroupEffectiveDate) {
        this.itemGroupEffectiveDate = itemGroupEffectiveDate;
    }

    @Temporal(TemporalType.DATE)
    @Column(name="ITEM_GROUP_EXPIRE_DATE", length=10)
    public Date getItemGroupExpireDate() {
        return this.itemGroupExpireDate;
    }
    
    public void setItemGroupExpireDate(Date itemGroupExpireDate) {
        this.itemGroupExpireDate = itemGroupExpireDate;
    }

    
    @Column(name="ITEM_GROUP_IS_ACTIVE")
    public Short getItemGroupIsActive() {
        return this.itemGroupIsActive;
    }
    
    public void setItemGroupIsActive(Short itemGroupIsActive) {
        this.itemGroupIsActive = itemGroupIsActive;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="mmItemGroup")
    public Set<MmItem> getMmItems() {
        return this.mmItems;
    }
    
    public void setMmItems(Set<MmItem> mmItems) {
        this.mmItems = mmItems;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="mmItemGroupByItemGroupNo")
    public Set<MmItemGroupSub> getMmItemGroupSubsForItemGroupNo() {
        return this.mmItemGroupSubsForItemGroupNo;
    }
    
    public void setMmItemGroupSubsForItemGroupNo(Set<MmItemGroupSub> mmItemGroupSubsForItemGroupNo) {
        this.mmItemGroupSubsForItemGroupNo = mmItemGroupSubsForItemGroupNo;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="mmItemGroupBySubItemGroupNo")
    public Set<MmItemGroupSub> getMmItemGroupSubsForSubItemGroupNo() {
        return this.mmItemGroupSubsForSubItemGroupNo;
    }
    
    public void setMmItemGroupSubsForSubItemGroupNo(Set<MmItemGroupSub> mmItemGroupSubsForSubItemGroupNo) {
        this.mmItemGroupSubsForSubItemGroupNo = mmItemGroupSubsForSubItemGroupNo;
    }




}


